package com.zscat.mallplus.finance.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zscat.mallplus.annotation.SysAdminOperLog;
import com.zscat.mallplus.bill.mapper.BillDeliveryMapper;
import com.zscat.mallplus.finance.entity.FinanceOrderStatistic;
import com.zscat.mallplus.finance.service.IFinanceOrderStatisticService;
import com.zscat.mallplus.oms.entity.OmsOrder;
import com.zscat.mallplus.oms.mapper.OmsOrderOperateHistoryMapper;
import com.zscat.mallplus.oms.mapper.OmsOrderSettingMapper;
import com.zscat.mallplus.oms.service.IOmsDeliveryExpressCompanyService;
import com.zscat.mallplus.oms.service.IOmsOrderItemService;
import com.zscat.mallplus.oms.service.IOmsOrderService;
import com.zscat.mallplus.utils.CommonResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author loop.fu
 * @since 2020-03-10
 */
@RestController
@RequestMapping("/finance/financeOrderStatistic")
public class FinanceOrderStatisticController {

    @Resource
    private IFinanceOrderStatisticService orderStatisticService;

    /**
     * 订单统计
     * @param entity
     * @return
     */
    @GetMapping(value = "/list")
    public Object getFinanceOrderStatisticList(FinanceOrderStatistic entity) {
        try {
            return new CommonResult().success(orderStatisticService.getFinanceOrderStatisticList(entity));
        } catch (Exception e) {
            e.printStackTrace();
            return new CommonResult().failed();
        }
    }

}

